from Global import *
from sqlalchemy import Column, Integer, String,ForeignKey


class User(Base):
    __tablename__ = 't_user'
    id = Column(Integer, primary_key=True)
    name = Column(String)
    age = Column(Integer)
    email = Column(String)


class Address(Base):
    __tablename__ = 't_address'
    id = Column(Integer, primary_key=True)
    address = Column(String)
    user_id = Column(Integer, ForeignKey('t_user.id'))
    # user = relationship('t_user', backref='addresses')


class Person(Base):
    __tablename__ = 't_person'
    id = Column(Integer, primary_key=True)
    name = Column(String)
    age = Column(Integer)
    email = Column(String)